Overview

Project summary

Goals:

Findings:

Data Overview

Twitter data

Twitter data was obtained freely through a partnership between UCSB Library and Crimson Hexagon. Before downloading, the data was queried to meet the following conditions:

  1. Tweet came from the Santa Barbara area (add more details about how CH applies the location query)
  2. Only original tweets (no retweets)
  3. Date was marked between January 1, 2015 and December 31, 2019

Crimson Hexagon only allows 10,000 randomly selected tweets to be exported, manually, at a time in .xls format. Due to this restriction, data was manually downloaded for every 2 days in order to capture all tweets. There were around 5000 average number of daily tweets that met these conditions.

The Crimson Hexagon data did not contain all desired information, including whether or not the tweet was geotagged. To get this information we used the python twarc library to “rehydrate” the data using individual tweet ids and store the tweet information as .json files. From here we were able to remove all tweets that did not have a geotag, giving us a total of 82,876 tweets.

Table of data

Here is a sample of the type of the final twitter information we obtained.

created_at tweet_id full_text user_id user_location geo_type geo_coordinates language retweet_count favorite_count lat lon
Thu Mar 05 03:44:07 +0000 2015 5.733281e+17 All I want in life is good food, nice clothes and someone to enjoy my presence. 35117228 california Point c(34.4119796, -119.85454855) en 2 0 34.41198 -119.8545
Fri Apr 03 19:46:51 +0000 2015 5.840796e+17 I still can’t believe we gave up Foles and 12 million in cap space and now some cripple named Samuel is our franchise QB 263870894 609 Point c(34.41449499, -119.70649011) en 0 5 34.41450 -119.7065
Fri Aug 07 00:02:19 +0000 2015 6.294424e+17 Lauren Pappas @laurenfitdj in Santa Barbara for Drop Dead Fit Magazine. #fitnessathlete #fitfam… https://t.co/qA5CGg0EGJ 2302521265 Santa Barbara, CA Point c(34.45159439, -119.75368444) en 0 2 34.45159 -119.7537
Wed Apr 19 16:53:01 +0000 2017 8.547396e+17 What is the meaning of love? #iloveyou #soontobebigbrother #santabarbara #california #aupairlife… https://t.co/HuMceXXWEE 295662875 La Chorrera, Panamá Point c(34.40224316, -119.72276721) en 0 0 34.40224 -119.7228
Sun Aug 16 04:05:53 +0000 2015 6.327652e+17 Awesome great time at #lindseystirling ! @ Santa Barbara Bowl https://t.co/S6KvlmnxJl 562928851 Santa Barbara, CA Point c(34.43474072, -119.69384422) en 0 1 34.43474 -119.6938
Sun Oct 30 21:22:14 +0000 2016 7.928391e+17 The groom’s family #theflorescabride #wearingfloresca #customfloresca @ Santa Barbara County… https://t.co/boDfNbpiRy 52962788 Los Angeles, CA Point c(34.42435, -119.702461) en 0 0 34.42435 -119.7025
Wed Jan 21 18:19:10 +0000 2015 5.579656e+17 Kunin Wines Tasting Room @kuninwines. http://t.co/vYWoimTEIt #Santa_Barbara 💖💞 thanks for being my http://t.co/Wvst0qF2wg 421095102 New York, USA Point c(34.41399614, -119.68882483) en 0 1 34.41400 -119.6888
Tue Jan 24 15:08:46 +0000 2017 8.239104e+17 current weather in Santa Barbara: light rain, 49°F 100% humidity, wind 4mph, pressure 1022mb 120332550 Santa Barbara, CA Point c(34.42, -119.7) en 0 0 34.42000 -119.7000
Wed Dec 28 19:01:59 +0000 2016 8.141846e+17 Last night wanderings brought me to this magical little corner of downtown 😊 #happiness @ Santa… https://t.co/s90uExRCsl 74403296 LO/GR, MI—NL—CA—ATX = LOVE Point c(34.4258, -119.714) en 0 0 34.42580 -119.7140
Sat Mar 12 02:09:17 +0000 2016 7.084749e+17 Arrived in #santabarbara a couple of hours ago. It’s much colder here and it’s been raining here… https://t.co/gZ5Pj6q43f 316532088 Spain Point c(34.4381218, -119.7254181) en 0 1 34.43812 -119.7254

The spatial distribution of tweets highlights areas of higher population density and tourist areas in downtown Santa Barbara. There is a single coordinate that has over 11,000 tweets reported across all years. It is near De La Vina between Islay and Valerio. There is nothing remarkable about this site so I assume it is the default coordinate when people tag “Santa Barbara” generally. The coordinate is 34.4258, -119.714.

Interactive with cluster markers

As you zoom in on the map, clusters will disaggregate. You can click on blue points to see the tweet.

Tweet density

This is log-transformed.

Identifying tourists and locals

This project aims to understand if and how preferences differ between tourists and locals for nature-based places within the Santa Barbara area. In order to test this we needed to come up with a way to identify tourists or locals. We used a two step process.

First, if the user has self-identified their location as somewhere in the Santa Barbara area, they are designated a local. This includes Carpinteria, Santa Barbara, Montecito, Goleta, Gaviota and UCSB. For the remainder, we use the number of times they have tweeted from Santa Barbara within a year to designate user type. If someone has tweeted across more than 2 months in the same year from Santa Barbara, they are identified as a local. This is consistent with how Eric Fischer determined tourists in his work. This is not fool-proof and there are instances were people visit and tweet from Santa Barbara more than two months a year, especially if they are visiting family or live within a couple hours driving distance.

There are 26408 tweets from tourists and 56468 tweets from locals.

The following map shows tweet log density by locals (top - blue) and tourists (bottom - red).

Identifying nature-based tweets

The full text of each tweet was analyzed to be either nature-based or not. We developed a coarse dictionary of words that indicate a nature-based tweet. These include natural features like ocean, coast, park, and works that indicate recreating (fishing, hiking, camping, etc.).

Note I had a hard time finding an ontology or lexicon that would fit this project. These are definitely skewed more towards nature and recreation rather than words like “home” or “connection”.

##  [1] "hike"        "trail"       "hiking"      "camping"     "tent"       
##  [6] "climb"       "summit"      "fishing"     "sail"        "sailing"    
## [11] "boat"        "boating"     "ship"        "cruise"      "cruising"   
## [16] "bike"        "biking"      "dive"        "diving"      "surf"       
## [21] "surfing"     "paddle"      "swim"        "ocean"       "beach"      
## [26] "^sea"        "sand"        "coast"       "island"      "wave"       
## [31] "fish"        "whale"       "dolphin"     "pacific"     "crab"       
## [36] "lobster"     "water"       "shore"       "marine"      "seawater"   
## [41] "lagoon"      "slough"      "saltwater"   "underwater"  "tide"       
## [46] "aquatic"     "^tree"       "^earth"      "weather"     "sunset"     
## [51] "sunrise"     "^sun"        "climate"     "park"        "wildlife"   
## [56] "^view"       "habitat"     "^rock"       "nature"      "mountains"  
## [61] "^peak"       "canyon"      "pier"        "wharf"       "environment"
## [66] "ecosystem"

Let’s look at some examples of what tweets qualified as “nature-based”.

kable(sample_n(nature_df %>% filter(nature_word == 1), 20)) %>%
  kable_styling(bootstrap_options = c("striped", "condensed"), font_size = 10, fixed_thead = T)
Month Day Time Year full_text user_id user_location geo_coordinates retweet_count favorite_count lat lon month_num date user_type nature_word
Nov 16 01:11:55 2015 just posted a photo @ stearns wharf https://t.co/k7imrod4zl 2.661428e+08 Santa Barbara, CA c(34.40946174, -119.68559167) 0 0 34.40946 -119.6856 11 2015-11-16 local 1
Apr 12 03:03:53 2015 sunset walk around santa barbara harbor. apparently i have a short attention span when it comes to… https://t.co/lrw3b3ysnz 2.854248e+09 Southern California c(34.4168891, -119.6719209) 1 0 34.41689 -119.6719 4 2015-04-12 tourist 1
Jul 3 23:40:51 2016 posing on the water wondering why my sister was waving at me like a crazy person. #carpinteria… https://t.co/xfmiruoefc 2.289352e+07 LA to OC on the daily c(34.39469237, -119.52715375) 0 0 34.39469 -119.5272 7 2016-07-03 local 1
Dec 6 20:46:15 2017 💎 ꭶ 𐤠 ℕ ɬ ø 𐍂 i ℕ i ❀ 𐊙 i ᏸ e ꭶ 💧 dreaming of warm beaches and blue water?! 💠 we are too…… https://t.co/uo6gqycb6m 1.246752e+09 Santa Barbara, CA c(34.4258, -119.714) 0 0 34.42580 -119.7140 12 2017-12-06 local 1
Nov 28 19:14:28 2018 oh the weather outside is frightful 🌧 , stop by our #paseonuevo management office to loan an umbrella ☂ as you shop today or text 805.900.7359 with any questions! 📸: the_garcia_girls_ @… https://t.co/jalxljket5 7.346066e+07 Santa Barbara, CA c(34.41931706, -119.70030286) 0 2 34.41932 -119.7003 11 2018-11-28 local 1
Aug 23 19:44:18 2018 oak smoked tri-tip sandwich: house bbq glazed tri-tip topped with pick de gallo on house baked garlic bread. shalhoobmeatco 😍 // somehow, my cheat meals always involve tri-tip sandwiches.… https://t.co/jsew9gfijs 7.229122e+17 Santa Barbara, CA c(34.4258, -119.714) 0 0 34.42580 -119.7140 8 2018-08-23 local 1
Aug 17 16:41:47 2018 elc sb cooling down on the ocean 🌊 ☀️with kayaking, standup paddle boarding and pedal boating 🛶 #weowntheocean #gettingwet 🐳🚣🏻‍♀️ @ santa barbara waterfront https://t.co/dy04i21q3r 7.716827e+08 1100 Santa Barbara Street c(34.40472749, -119.69395469) 0 0 34.40473 -119.6940 8 2018-08-17 local 1
Aug 14 13:38:03 2019 drove through the night to get here like i do every year and take in the sunrise. this place gives me clarity and is the perfect way for me to start this vacation with my two sons before i pick them up in sd. i try… https://t.co/czlcv04edb 1.820298e+07 408 | San Jose, CA c(34.4258, -119.714) 0 0 34.42580 -119.7140 8 2019-08-14 tourist 1
Nov 5 16:16:34 2018 up the coast we go 😏 my first time driving a ferrariusa 🙆🏼‍♂️ talk about dreams come true… #ferrariportofino #dapperontheroad 📷 @officialhilda @ santa barbara, california https://t.co/wp9uh5af4x 3.927961e+08 New York City c(34.4258, -119.714) 0 0 34.42580 -119.7140 11 2018-11-05 tourist 1
Aug 12 22:58:10 2017 with my 2 💟s mi #amor & #sirbenson. 💋💋🕶👙 @ butterfly beach https://t.co/ojqcr0fpsk 9.079796e+07 Hollywood Ca c(34.41807, -119.64847) 0 1 34.41807 -119.6485 8 2017-08-12 tourist 1
Dec 27 23:32:22 2019 i see don imus passed away today at the age of 79. controversial for sure, but he was generous enough to buy me a cowboy hat 15 years ago. i gave him a weather forecast for his arrival in new mexico when a blizzard… https://t.co/cyju3ngr28 4.984254e+07 California c(34.4258, -119.714) 2 9 34.42580 -119.7140 12 2019-12-27 local 1
Jul 30 03:06:18 2017 i’m at boathouse at hendry’s beach in santa barbara, ca https://t.co/tlvlyoknya 4.262777e+08 Luxembourg c(34.40343969, -119.74406719) 0 1 34.40344 -119.7441 7 2017-07-30 tourist 1
Feb 21 22:54:58 2016 i’m at fess parker’s doubletree resort in santa barbara, ca https://t.co/jskfvwqs4v 5.575781e+07 Los Angeles, CA Monterey, CA c(34.41691647, -119.677063) 0 0 34.41692 -119.6771 2 2016-02-21 tourist 1
Feb 16 04:07:41 2015 and tomorrow is a holiday! @ butterfly beach http://t.co/ujy8vehmj1 2.890939e+08 Los Angeles c(34.41706349, -119.64485679) 0 0 34.41706 -119.6449 2 2015-02-16 tourist 1
Mar 8 02:43:46 2015 great day at the beach w/ b3k4hb14ck robinbergstedt tanjjjj @ santa barbara beach https://t.co/f0iitif5nt 1.356696e+08 Göteborg, Sverige c(34.41688082, -119.67218067) 0 0 34.41688 -119.6722 3 2015-03-08 tourist 1
Jun 13 04:23:22 2016 the only hunting i partake in 🌊 @ loon point beach https://t.co/iadi9hnavk 7.994293e+08 NA c(34.41515001, -119.58103265) 0 0 34.41515 -119.5810 6 2016-06-13 tourist 1
Aug 1 17:38:13 2018 surf ‘n’ suds beer festival august 11th in carpinteria.wild world of beer will be there shooting our youtube show. #pilsner #surfnsuds2018 #beer #beerfest #beerlife #beerpics… https://t.co/rhzodsct0l 4.781448e+09 NA c(34.3983, -119.51799) 0 0 34.39830 -119.5180 8 2018-08-01 tourist 1
Jul 26 00:13:48 2017 thanks to kyle ashby of startupsb & sandboxsb for bringing a group of brazilian students to tour… https://t.co/q9qwei4jsh 1.749612e+07 Santa Barbara, CA, USA c(34.4245911, -119.6870041) 0 0 34.42459 -119.6870 7 2017-07-26 local 1
Aug 3 02:12:55 2016 sea urchins fresh from the santa barbara channel. #chefmichaelhutchings #michaelscateringsb… https://t.co/9f4z2yh8vv 5.443609e+07 Santa Barbara, California, USA c(34.4258, -119.714) 0 0 34.42580 -119.7140 8 2016-08-03 local 1
Nov 8 13:58:33 2016 ❤️i have a thousand why’s…rise and let your light be the guide to… https://t.co/etisjwrsec 2.660792e+08 Santa Barbara c(34.46343, -119.78776) 0 0 34.46343 -119.7878 11 2016-11-08 local 1

Where are nature-based tweets?

After identifying nature-based tweets we can take a look at where these tweets are coming from and compare to the general pattern of tweets.

nature_sf <- nature_df %>%
  st_as_sf(coords = c("lon", "lat")) %>%
  st_set_crs(4326)

hex_tweet_count_nature <- hex_grid %>%
  mutate(tweet_count = lengths(st_intersects(hex_grid, nature_sf %>% filter(nature_word == 1))),
         log_tweet_count = log(tweet_count))

#color palettes
greens = colorRampPalette(c("#E5F5E0", "#00441B"))

m <- mapview(hex_tweet_count_nature %>% filter(tweet_count > 0), 
        zcol = "log_tweet_count", 
        layer.name = "# Nature tweets (log)",
        col.regions = greens) 

m@map %>% setView(lng = -119.714, lat = 34.426, zoom = 12)

Who is tweeting nature-based tweets?

Not surprisingly there are less nature-based tweets than nature-based. Of all tweets, % are nature-based.

Of local tweeters, 13.7643962% of tweets are nature-based. Of tourists, 21.716904% are nature-based.

Are tweets in protected areas more often nature-based?

California Protected Areas Database

Time

Timeline of tweets

Initial hypothesis was identifying spikes in nature-based tweets around three significant events: - Refugio oil spill in 2015 - Thomas fire in 2017 - Debris flow in 2018

Word clouds

top 100 words for locals vs tourist. And we could do this in space. At sterns wharf what are people tweeting about? At Elings, what are locals tweeting about?

Maybe in word clouds we can see some changes due to natural events

All of SB

By area

Sentiment Analysis

Lessons learned

Data is harder to find

Future research

Looking at different scale areas

There might be an interesting comparison between rural-suburban-urban areas. We hypothseize that the tourist/local alignment would split in urban areas, maybe aligned in suburban (like SB) and maybe not exist in rural.

Proportion of words that are nature based tells you how people. In Santa Barbara, there will be a lot of nature-based sense of place. In Manhattan, we wouldn’t expect to see nature based ones so much.

In a blog piece we can pose questions that we couldn’t answer but stuff like “can proportion of tourists/locals in place engagement tell us anything”.

Could compare % nature based tweets in SB to other areas. If we did this across the whole state, what proportion% are nature based? Maybe on average its just 5%.

Where and why do locals and tourists overlap in their use of area. SB seems to have a high alignment of tourists/locals, which may be helpful for local policy. Maybe places with distinct differences in how tourists/locals use places.

Look at cities of different coastal sizes rural - small town - urban - mega city. Could see how tourists/locals patterns differentiate across scale.

Is there a threshold of tourists where locals don’t go anymore?

In areas where we see both tourists and locals engaging, what characteristics do we see?

Quantifying transitions between rural to city.

Talk about overall social media literature for conservation and how this project is similar/different and used lessons from those papers to guide this analysis.